package state

type Error int

const (
	Err Error = iota
	CopyStruct
	DB
	ParamsBind
	GenerateJwt
	ExecuteRedis
)

func (s Error) String() string {
	switch s {
	case Err:
		return "error"
	case CopyStruct:
		return "拷贝对象失败"
	case DB:
		return "数据库查询失败"
	case ParamsBind:
		return "参数绑定失败"
	case GenerateJwt:
		return "生成JWT失败"
	case ExecuteRedis:
		return "执行redis命令失败"
	default:
		return "未知错误"
	}
}
